<template>
  <div class="app-container">
    <el-card class="content-edit">
      <div slot="header">路线详情</div>
      <el-form label-width="140px">
        <el-form-item label="路线名称">{{ form['name'] }}</el-form-item>
        <el-form-item label="运营时间">{{ form['sex'] }}</el-form-item>
        <el-form-item label="路线类型">{{ form['sex'] }}</el-form-item>
        <el-form-item label="默认车票价">{{ form['sex'] }}</el-form-item>
        <el-form-item label="周末车票价">{{ form['sex'] }}</el-form-item>
        <el-form-item label="指定日期车票价">{{ form['sex'] }}</el-form-item>
        <el-form-item label="车型">{{ form['status'] }}</el-form-item>
        <el-form-item label="荷载人数">{{ form['joinTime'] }}</el-form-item>
        <el-form-item label="班次">{{ form['mobile'] }}</el-form-item>
        <el-form-item label="可售车票">{{ form['email'] }}</el-form-item>
        <el-form-item label="上车点">{{ form['address'] }}</el-form-item>
        <el-form-item label="目的地">{{ form['couponNum'] }}张</el-form-item>
        <el-form-item label="司机">{{ form['usedCouponNum'] }}张</el-form-item>
        <el-form-item label="联系方式">{{ form['invoiceNum'] }}张</el-form-item>
        <el-form-item>
          <router-link :to="`./edit?id=${form['id']}`">
            <el-button type="primary">编辑</el-button>
          </router-link>
          <el-button @click="$router.back()">返回</el-button>
        </el-form-item>
      </el-form>
    </el-card>
  </div>
</template>

<script>
  export default {
    name: 'RouteCarpoolDetails',
    data() {
      return {
        form: {
          id: '',
          // 昵称
          name: '',
          //  性别
          sex: null,
          // 状态
          status: 1,
          // 手机
          mobile: '',
          // 邮箱
          email: '',
          // 地址
          address: '',
          // 备注信息
          remarks: '',
          // 头像
          avatar: ''
        }
      }
    },
    mounted(){
      this.loadData();
    },
    methods: {
      // 加载用户信息
      loadData(){
        (async () => {
          const result = await this.$service.adminApplicationTagGetTagTree();
          if (result.code === 0) {
            this.form = result.data;
          }
        })();
      }
    }
  }
</script>
